//
//  UIStandard.swift
//  EYEE
//
//  Created by 卢光友 on 2019/4/3.
//  Copyright © 2019年 zali. All rights reserved.
//

import Foundation

// MARK: - 标准字体颜色
// MARK: - 标准字体颜色
extension UIColor {
    @objc class var fc1: UIColor {
        return UIColor.init(hexString: "232323")
    }
    
    @objc class var fc2: UIColor {
        return UIColor.init(hexString: "646464")
    }
    
    @objc class var fc3: UIColor {
        return UIColor.init(hexString: "787878")
    }
    
    @objc class var fc4: UIColor {
        return UIColor.init(hexString: "969696")
    }
    
    @objc class var fc5: UIColor {
        return UIColor.init(hexString: "B4B4B4")
    }
    
    @objc class var fc6: UIColor {
        return UIColor.init(hexString: "8246DC")
    }
    
    @objc class var fc7: UIColor {
        return UIColor.init(hexString: "FA4B4B")
    }
    
    @objc class var fc8: UIColor {
        return UIColor.init(hexString: "0AB978")
    }
    
    @objc class var fc9: UIColor {
        return UIColor.init(hexString: "FFC700")
    }
    
    @objc class var fc10: UIColor {
        return UIColor.init(hexString: "DCDCDC")
    }
    
    @objc class var fc11: UIColor {
        return UIColor.init(hexString: "333333")
    }
    
    @objc class var fc12: UIColor {
        return UIColor.init(hexString: "949494")
    }
    
    @objc class var fc13: UIColor {
        return UIColor.init(hexString: "999999")
    }
    
    @objc class var fc14: UIColor {
        return UIColor.init(hexString: "F2F2F2")
    }
    
    @objc class var fc15: UIColor {
        return UIColor.init(hexString: "FA2337")
    }
    
    @objc class var fc16: UIColor {
        return UIColor.init(hexString: "CCCCCC")
    }
    
    @objc class var fc17: UIColor {
        return UIColor.init(hexString: "FF6828")
    }
    
    @objc class var fc18: UIColor {
        return UIColor.init(hexString: "666666")
    }
    
    @objc class var fc19: UIColor {
        return UIColor.init(hexString: "4075EF")
    }
}


// MARK: - 标准背景颜色
extension UIColor {
    @objc class var bg1: UIColor {
        return UIColor.init(hexString: "FFFFFF")    //大模块背景
    }
    
    @objc class var bg2: UIColor {
        return UIColor.init(hexString: "FAFAFA")
    }
    
    @objc class var bg3: UIColor {
        return UIColor.init(hexString: "F5F5F5")    //全局底色
    }
    
    @objc class var bg4: UIColor {
        return UIColor.init(hexString: "F0F0F0")
    }
    
    @objc class var bg5: UIColor {
        return UIColor.init(hexString: "E6E6E6")
    }
    
    @objc class var bg6: UIColor {
        return UIColor.init(hexString: "373737")
    }
    
    @objc class var bg7: UIColor {
        return UIColor.init(hexString: "232323")
    }
    
    @objc class var bg8: UIColor {
        return UIColor.init(hexString: "191919")
    }
    
    @objc class var bg9: UIColor {
        return UIColor.init(hexString: "8246DC")    //主色
    }
    
    @objc class var bg10: UIColor {
        return UIColor.init(hexString: "FA4B4B")
    }
    
    @objc class var bg11: UIColor {
        return UIColor.init(hexString: "F02D2D")
    }
    
    @objc class var bg13: UIColor {
        return UIColor.init(hexString: "0AA569")
    }
    
    @objc class var bg14: UIColor {
        return UIColor.init(hexString: "0FF5A50")
    }
    
    @objc class var bg15: UIColor {
        return UIColor.init(hexString: "CDCDCD")
    }
    
    @objc class var bg16: UIColor {
        return UIColor.init(hexString: "C8C8C8")
    }
}

// MARK: - 标准字体
extension UIFont {
    
    /// 苹方常规
    ///
    /// - Parameter size: 字体大小
    /// - Returns: 字体对象
    @objc class func pingfangRegular(size: CGFloat) ->UIFont? {
        return UIFont(name: "PingFangSC-Regular", size: size)
    }
    
    /// 苹方中粗
    ///
    /// - Parameter size: 字体大小
    /// - Returns: 字体对象
    @objc class func pingfangMedium(size: CGFloat) ->UIFont? {
        return UIFont(name: "PingFangSC-Medium", size: size)
    }
    
    /// 苹方半黑体
    ///
    /// - Parameter size: 字体大小
    /// - Returns: 字体对象
    @objc class func pingfangSemibold(size: CGFloat) ->UIFont? {
        return UIFont(name: "PingFangSC-Semibold", size: size)
    }
    
    /// 数字价格字体
    ///
    /// - Parameter size: 字体大小
    /// - Returns: 字体对象
    @objc class func dinot(size: CGFloat) ->UIFont? {
        return UIFont(name: "DIN-Bold", size: size)
    }
    
    @objc class func impact(size: CGFloat) ->UIFont? {
        return UIFont(name: "Impact", size: size)
    }
    
}

//页面布局间隙参数
@objc class PageLayout: NSObject {
    
    /// 页面左边界与内容的距离
    @objc class var pageLeftInset: CGFloat {
        return 15
    }
    
    /// 页面右边界与内容的距离
    @objc class var pageRightInset: CGFloat {
        return 15
    }
    
    /// 页面元素垂直方向上的间隙
    @objc class var pageItemVerticalGap: CGFloat {
        return 10
    }
    
    /// 控件小圆角
    @objc class var smallCorner: CGFloat {
        return 2
    }
    
    /// 控件大圆角
    @objc class var bigCorner: CGFloat {
        return 4
    }
    
    /// 分割线高度
    @objc class var divisionLineHeight: CGFloat {
        return 1
    }
}

// MARK: - 为了兼容已有的颜色设置.(后续不再使用)
//extension UIColor {
//    static func random() -> UIColor {
//        let red   = CGFloat.init(Double(arc4random_uniform(256)) / 256.0)
//        let green = CGFloat.init(Double(arc4random_uniform(256)) / 256.0)
//        let blue  = CGFloat.init(Double(arc4random_uniform(256)) / 256.0)
//        return UIColor(red: red, green: green, blue: blue, alpha: 1)
//    }
//    
//    open class var eLightGray: UIColor {
//        return UIColor.colorWithHexString("EBEBEB")
//    }
//    
//    open class var eLayerBorderGray: UIColor {
//        return UIColor.colorWithHexString("CCCCCC")
//    }
//}
